<MultiSelect Items="@Items" @bind-Value="@SelectedItemsValue" ShowSearch="true" OnSearchTextChanged="@OnSearch"></MultiSelect>

@code {
    /// <summary>
    /// 获得 默认数据集合
    /// </summary>
    private readonly IEnumerable<SelectedItem> Items = new SelectedItem[]
    {
        new SelectedItem ("Beijing", "北京"),
        new SelectedItem ("Shanghai", "上海"),
        new SelectedItem ("Guangzhou", "广州"),
        new SelectedItem ("Shenzhen", "深圳"),
        new SelectedItem ("Chengdu", "成都"),
        new SelectedItem ("Wuhan", "武汉"),
        new SelectedItem ("Dalian", "大连"),
        new SelectedItem ("Hangzhou", "杭州"),
        new SelectedItem ("Lianyungang", "连云港"),
    };
    
    private string SelectedItemsValue { get; set; } = "Beijing,Chengdu";

    private IEnumerable<SelectedItem> OnSearch(string searchText)
    {
        return Items.Where(i => i.Text.Contains(searchText, System.StringComparison.OrdinalIgnoreCase));
    }
}
